<link rel="stylesheet" type="text/css" href="/templates/styles/tabcontent.css">
<script type="text/javascript" src="/templates/scripts/tabcontent.js"></script>
<!-- TinyMCE -->
<script type="text/javascript" src="/templates/scripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
    tinyMCE.init({
    // General options
    mode : "textareas",
    theme : "advanced",
    plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave,visualblocks",

    // Theme options
    theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
    theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
    theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
    theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft,visualblocks",
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "left",
    theme_advanced_statusbar_location : "bottom",
    theme_advanced_resizing : true,

    // Replace values for the template plugin
    template_replace_values : {
    username : "Some User",
    staffid : "991234"
}
});
</script>
<!-- /TinyMCE -->
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
        <td class="bgtitle">
            <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
                <tr>
                    <td width="20">
                        <img src="/templates/images/mui_ten.gif" /></td>
                    <td valign="bottom" class="title">Tin tức</td>
                    <td width="10" valign="bottom">&nbsp;</td>
                </tr>
            </table>
        </td>
    </tr>     
    <tbody>
        <tr>
            <td valign="top">
                <table width="100%" style="border-collapse: collapse" border="0" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
                </table>
                <br>
                <!-- 3 menu cố định -->
                <div id="pettabs" class="indentmenu">
                    <ul>
                        <li>
                            <a href="#" rel="dog1" class="selected">
                                <strong>Tin tức</strong>
                            </a>
                        </li>
                        <li>
                            <a href="#" rel="dog2" class="">
                                <strong>Soạn tin </strong>
                            </a>
                        </li>

                    </ul>
                    <br style="clear: left">
                </div>

                <!-- Chọn menu nào thì tab đó xuất hiện -->
                <div style="border:1px solid #CCCCCC; width:960px; padding-bottom:0px; padding-left:0px; padding-right:0px; padding-top:0px;">
                    <!-- Dog 1, chèn nội dung vào đây --->
                    <div id="dog1" class="tabcontent" style="display: block;">                        
                        <!--form hiện tin-->
                        <form action="/login" method="post" enctype="multipart/form-data" name="loginForm" id="loginForm" style="margin:0; padding:0" onsubmit="return verifyloginForm(this)">
                            <table class="display dataTable" id="example" width='100%' align='center' border='0' cellpadding='2'  cellspacing='0' bordercolor='#CCCCCC' style='border-collapse:collapse;font-size:12px'>
                                <tfoot>
                                    <tr>
                                        <th style="visibility: hidden"></th>
                                        <th></th>
                                        <th style="visibility: hidden"></th
                                        <th style="display:block"></th>
                                        
                                    </tr>
                                </tfoot>				
                                <thead>
                                    <tr>
                                        <th height='30' class='bgmenupro border3' bgcolor='#DDDDDD' style="width:23px!important">
                                <div align='center'>
                                    <strong>STT</strong>
                                </div>
                                </th>
                                <th class='bgmenupro border3' bgcolor='#DDDDDD' style="width:52px!important">
                                <div align='center'>
                                    <strong>Tiêu đề</strong>
                                </div>
                                </th>
                                <th class='bgmenupro border3' bgcolor='#DDDDDD' style="width:32px!important">
                                <div align='center'>
                                    <strong>Ngày tạo</strong>
                                </div>
                                <th class='bgmenupro borderfull' bgcolor='#DDDDDD' width='3%'>
                                <div align='center'>
                                    <strong>Tùy chỉnh</strong>                     
                                </div>
                                </th>
                                </tr>
                                </thead>
                                <tbody>
                                    <!--load đơn hàng-->
                                    {foreach from=$article item=a}    
                                        <tr>
                                            <td class='border3'>{$a@index+1}</td>
                                            <td class='border3'>{$a.title}</td>
                                            <td class='border3'>{$a.datecreate}</td>
                                          
                                            <td class='borderfull'>
												<div style="float: left">
														<a href='/admin/news/delete/{$a.idarticle}'>
															<img src='/templates/images/deleteuser.png' border='0'>
														</a>
													</div>
															<div>
														<a href='/admin/news/edit/{$a.idarticle}'>
															<img src='/templates/images/edit.jpg' border='0'>
														</a>
													</div>
											</td>
                                        </tr>
                                    {/foreach}

                                    <!--load xong -->
                                </tbody>

                            </table>
                            <br>
                            <br>

                        </form>
                        <br />
                        <!-- begin: popup!-->
                        <script language="javascript">
                    /*
                        Auto center window script- Eric King (http://redrival.com/eak/index.shtml)
                        Permission granted to Dynamic Drive to feature script in archive
                        For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
                     */

                    var win = null;
                    function NewWindow(mypage,myname,w,h,scroll){
                    LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
                    TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
                    settings =
                        'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
                    win = window.open(mypage,myname,settings)
                }

                        </script>
                        <!-- end: popup!-->
                        <!--/hiện thị sản phẩm-->
                    </div>

                    <!--Dog2,Soạn tin-->
                    <div id="dog2" class="tabcontent" style="display: none;">                     
                        <form action="/admin/news/addnew" method="post" enctype="multipart/form-data" name="addproduct" id="addproduct" style="margin:0; padding:0" onsubmit="return verifyregisterForm(this)">
                            <table width="95%" border="0" cellpadding="3" cellspacing="0" bordercolor="#CCCCCC" style="font-family: Tahoma; font-size: 10pt; border-collapse:collapse; padding:10px">
                                <tbody>
                                    <tr>
                                        <td class="bgtitle" colspan="6">
                                            <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
                                                <tr>
                                                    <td width="20">
                                                        <img src="/templates/images/mui_ten.gif" /></td>
                                                    <td valign="bottom" class="title">Thêm soạn tin</td>
                                                    <td width="10" valign="bottom">&nbsp;</td>
                                                </tr>
                                            </table>
                                        </td>
                                        <td></td>
                                    </tr>  
                                    <tr>                                       
                                        <td width="10%">Tiêu đề</td>
                                        <td width="20%">
                                            <input name="title" type="text" class="box_input" id="title" size="24">
                                        </td>
									</tr>
									<tr>
                                        <td width="10%">Alias</td>
                                        <td width="20%">
                                            <input name="alias" type="text" class="box_input" id="alias" size="24">
                                        </td>
									</tr>									
									<tr>
										<td></td>
										<td width=10% rowspan="2" valign="top">                                           
											<input type="submit" name="savenew" id="addnew" value="Lưu tin">                                        
										</td>
									</tr>
										
									<tr>
										<td valign="top" colspan="2">Nội dung</td>
										<td></td>
									<tr>
										<td colspan="6">
											<textarea id="content" name="content" rows="45" cols="90" style="width: 80%">
											</textarea>
										</td>
									</tr>
                                </tbody>
                            </table> 
                        </form>
                    </div>   
                    <!--Dog2,Thêm sản phẩm xong-->
                </div>
            </td>
        </tr>
    </tbody>
</table>

<script type="text/javascript">
var mypets=new ddtabcontent("pettabs")
mypets.setpersist(true)
mypets.setselectedClassTarget("link")
mypets.init(0)
</script>
<br>
<!---ham tao tab-->

<!--loc-->
